package com.example.designpatterns.Strategy.Cash;

/**
 * @author HUAWEI
 * 打折收费
 */
public class CashRebate extends CashSuper{
    private double moneyRebate = 1;
    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }
    @Override
    public double acceptCash(double price, double num) {
        return price * num * moneyRebate;
    }
}
